/*******************************************************************************
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *  
 * Copyright (c) 2011 Michael Chan.
 ******************************************************************************/
package com.google.code.solrdimension.indexmodifiers;

import org.apache.solr.common.SolrInputDocument;

import com.google.code.solrdimension.config.dimensionvalue.AbstractDimensionValueConfig;

/**
 * The index modifier action. IndexModActions implementing this interface should
 * register the {@link AbstractDimensionValueConfig} to IndexModAction mapping
 * in the SolrDimensionConfig spring bean declaration
 * 
 * 
 * 
 * @author mhc
 * 
 */
public interface IndexModAction {

    /**
     * * Note that there isn't any exception handling in this interface.
     * 
     * It is assumed that the CORRECT instance of subtypes of
     * {@link AbstractDimensionValueConfig} will be passed to the IndexModAction
     * and {@link SolrInputDocument} is never null
     * 
     * @return
     *      True if the solrInputDoc has been modified correctly, false otherwise
     **/
    public boolean execute(AbstractDimensionValueConfig dimensionValueconfig, SolrInputDocument solrInputDoc, Object objecToIndex);

}
